package com.example.actionbarfim;

import android.app.ActionBar;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.view.MenuInflater;

public class MainActivity extends SherlockActivity {

	Button btTela2;
	
	com.actionbarsherlock.app.ActionBar actionBar;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        
       actionBar=getSupportActionBar();
       
     // 
        
    }

	@Override
	public boolean onCreateOptionsMenu(com.actionbarsherlock.view.Menu menu) {
		MenuInflater inflater = getSupportMenuInflater();
		inflater.inflate(R.menu.activity_main, menu);
		return true;
	}

	@Override
	public boolean onOptionsItemSelected(
			com.actionbarsherlock.view.MenuItem item) {
		switch (item.getItemId()) {
		case R.id.subItem1:
			Toast.makeText(MainActivity.this, "MENU ITEM 1", Toast.LENGTH_SHORT).show();
		startActivity(new Intent(MainActivity.this, Pesquisar.class));
			return true;
			
		case R.id.subItem2:
			Toast.makeText(MainActivity.this, "MENU ITEM 2", Toast.LENGTH_SHORT).show();
			return true;
		}
		return super.onOptionsItemSelected(item);
	}

    

	
}

	
    

